<include file="Public/header"/>
<body>
<header>
<div class="tab_nav">
   <div class="header">
     <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
     <div class="h-mid"><img src="__STATIC__/images/toplogo.png">库存订单</div>
     <div class="h-right">
       <aside class="top_bar">
         <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
       </aside>
     </div>
   </div>
 </div>
</header>
<include file="Public/menu"/>

<div id="tbh5v0">
<!--------筛选 form 表单 开始-------------->
<!-- <form action="{:U('Mobile/order_list/ajax_order_list')}" name="filter_form" id="filter_form">   -->
      <!-- <div class="Evaluation2">
                <ul>
                  <li><a href="{:U('/Mobile/User/order_list')}" class="tab_head <if condition="$_GET[type] eq ''">on</if>"  >全部</a></li>
                  <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITPAY'))}"      class="tab_head <if condition="$_GET[type] eq 'WAITPAY'">on</if>">待付款</a></li>
                  <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITSEND'))}"     class="tab_head <if condition="$_GET[type] eq 'WAITSEND'">on</if>">待发货</a></li>
                  <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITRECEIVE'))}"  class="tab_head <if condition="$_GET[type] eq 'WAITRECEIVE'">on</if>">待收货</a></li>
                  <li><a href="{:U('/Mobile/User/order_list',array('type'=>'WAITCCOMMENT'))}" class="tab_head <if condition="$_GET[type] eq 'WAITCCOMMENT'">on</if>">已完成</a></li>
                </ul>
          </div>  -->    

<div class="Funds">
  <ul>
<foreach name="order_lists" item='coupon'>
    <li class="Funds_li" <if condition="$k eq count($account_log)"> style="border:0"</if>>
    	<span class="icon <if condition='$k eq 0'>on</if>"></span>
        <span>收货人姓名:<em style="color:#01622f;">{$coupon.consignee}</em></br>
        地址:<em style="color:#01622f;">{$coupon.address}</em></br>
        电话:<em style="color:#01622f;">{$coupon.mobile}</em></br>
        下单日期:<em style="color:#01622f;">{$coupon.add_time|date='Y-m-d H:s',###}</em>
        </span>
        <span>是否发货:<em style="color:#01622f;">
                             <if condition='$coupon.shipping_status eq 0'> 
                                 正在处理中
                                 <else />
                                  {$coupon.shipping_name}&nbsp;单号:{$coupon.shipping_code}
                                 </if></em></span>
        <span style="text-decoration:underline;"><a href="__URL__/detail/id/{$coupon.order_id}">查看订单详情>></a></span>
    </li>
</foreach>
  </ul>
</div>

  <!--查询条件-->
  <input type="hidden" name="type" value="<?php echo $_GET['type'];?>" />
<!-- </form>   --> 
<notempty name="lists"> 
   <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
  		<a href="javascript:void(0)" onClick="ajax_sourch_submit()">点击加载更多</a>
  </div>         
</notempty>    
</div>


<script language="javascript">
var  page = 1;
 
 /*** ajax 提交表单 查询订单列表结果*/  
 function ajax_sourch_submit()
 {	 	
 		page += 1; 	 
		$.ajax({
			type : "GET",
			url:"/index.php?m=Mobile&c=User&a=order_list&type={$_GET['type']}&is_ajax=1&p="+page,//+tab,			
//			url:"{:U('Mobile/User/order_list',array('type'=>$_GET['type']),'')}/is_ajax/1/p/"+page,//+tab,			
			//data : $('#filter_form').serialize(),
			success: function(data)
			{
				if(data == '')
					$('#getmore').hide();
				else  
				{
					$(".ajax_return").append(data);			
					$(".m_loading").hide();
				}
			}
		}); 
 }
 
//取消订单
function cancel_order(id){
	if(!confirm("确定取消订单?"))
		return false;
	location.href = "/index.php?m=Mobile&c=User&a=cancel_order&id="+id;
}

</script>
</body>
</html>